<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>context 解构</title>
</head>
<body>
<div id="app">
</div>

<script type="module">
    import {createApp, defineComponent} from "../../../js/vue.esm-browser.js";

    let app = createApp(
        {

            /*setup(props, context) {
                console.log(context);

                /!*
                // 完整的解构 context
                let {attrs, emit, expose, slots} = context
                console.log(attrs);
                console.log(emit);
                console.log(expose);
                console.log(slots);
                *!/

                let {expose} = context
                console.log(expose);

                return {}
            }*/

            /*setup(props,{attrs, emit, expose, slots} ){
                console.log(attrs);
                console.log(emit);
                console.log(expose);
                console.log(slots);

                return {}
            }*/

            setup(props, {expose}) {

                console.log(expose);
                return {}
            }
        }
    );

    app.mount("#app")
</script>
</body>
</html>